home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
lib
/
X11
/
config
/
scoLib.rules
< prev
next >
Wrap
Text File
|
1995-07-17
|
11KB
|
336 lines
XCOMM $XConsortium: scoLib.rules,v 1.8 91/07/19 15:38:53 rws Exp $
/*
* @(#) scoLib.rules 12.1 95/05/09
* SCO library rules, includes shared lib rules
*
* SCO Modification History
* S026, 27-Jul-94, garyh, SCO-59-3684
* InstallSharedLibrary() rule now handles DLLs, and
* InstallStaticSharedLibrary() rule handles static shared libs.
* S025, 18-Apr-94, garyh
* Don't need the conditional check for S024 since $(RM) includes the force option
* S024, 15-Apr-94, garyh
* Removed old symlink to libAPI.so (if it exist)
* S023, 14-Apr-94, garyh
* Removed DLLCCPATH
* S022, 02-Feb-94, garyh
* Added SharedLibraryDLLTarget() rule
* S021, 06-Oct-93, kylec
* Add InstallAppDefaultsSubDir()
* S021, 05-Oct-93, wing
* Deleted the rules that I put in. Found a better place for them
* S020, 03-Oct-93, wing
* Added WSLinkSourceFile rule.
* S019, 18-Jan-93, hess
* appstartup rule needs destdir variable
* S018, 18-Dec-92, hess
* add appstartup install rule
* S017, 21-Sep-92, hess
* don't build mkshlib, back out S011
*
* S016, 20-sep-92, mikep
* move notsharedobjects rule from Library.tmpl to here
* S015, 05-Aug-92, hess
* make the shared libs depend on the .a instead of the _s
* in the case of an error building the library, it will still re-try
* S014, 20-Jul-92, hess
* modify normalLibrules2 and 3 to build in steps, this avoids the make
* errro "$? list too long". The hardcoded limit on dependencies is
* 2500 chars per rule.
* S013, 16-Jun-92, hess
* add install.runtime for installing shared lib target files.
* S012, 15-Jun-92, hess
* add extractobject
* S011, 02-Jun-92, hess
* add rule to build MKSHLIB, if it's not there. When a clean is
* done, util is made after lib/X... This fix is similar to the one
* used to build makedepend if it's not there.
* S010, 18-Mar-92, hess
* tweak Normallib rules to run an MCS command, (see scoLib.tmpl)
* in general we want to delete any comments in the objects.
* S009, 18-Mar-92, hess
* fix install shared lib rule
* S008, 12-Feb-92, hess
* clean up shared libs rule, remove the touchfile before making a new
* lib.
* S007, 11-Feb-92, hess
* remove the touch file before calling mkshlib
* S006, 10-Feb-92, hess
* when a new libX11_s.a is made touch a file to let us know when
* it was done.
* S005, 10-Feb-92, hess
* only append objs if the lib is already there
* S004, 10-Feb-92, hess
* add rule to install shared libs.
* S003, 06-Feb-92, hess
* add normallibrarytarget5 for Xlib.
* S002, 30-Jan-92, hess
* add libcLeandir to workaround argv too long for rm.
* S001, 17-Jan-92, hess
* add normallibrarytarget4 for Xlib, it's too big to build with target3
* S000, 10-Jan-92, hess
* created
*/
#ifndef HasSharedLibraries
#define HasSharedLibraries YES
#endif
#ifndef SharedDataSeparation
#define SharedDataSeparation NO
#endif
#ifndef SharedCodeDef
#define SharedCodeDef /**/
#endif
#ifndef SharedLibraryDef
#define SharedLibraryDef -DSHARELIB -DUSL_COMPAT
#endif
#ifndef ShLibIncludeFile
#define ShLibIncludeFile <scoLib.tmpl>
#endif
#ifndef SharedLibraryLoadFlags
#define SharedLibraryLoadFlags /**/
#endif
#ifndef PositionIndependentCFlags
#define PositionIndependentCFlags -KPIC
#endif
/*
* Concat4 - concatenates four strings.
*/
#ifndef Concat4
#if __STDC__ && !defined(UnixCpp)
#define Concat4(a,b,c,d)a##b##c##d
#else
#define Concat4(a,b,c,d)a/**/b/**/c/**/d
#endif
#endif
/*
* InstallSharedLibrary - generate rules to install the shared library.
*/
#ifndef InstallSharedLibrary
#define InstallSharedLibrary(libname,rev,dest) @@\
install.runtime:: Concat4(lib,libname,.so.,rev) @@\
MakeDir($(DESTDIR)/usr/lib) @@\
$(INSTALL) -c $(INSTBINFLAGS) Concat4(lib,libname,.so.,rev) $(DESTDIR)/usr/lib
#endif /* InstallSharedLibrary */
/*
* InstallStaticSharedLibrary - generate rules to install the static shared library.
*/
#ifndef InstallStaticSharedLibrary
#define InstallStaticSharedLibrary(libname,rev,dest) @@\
install:: Concat3(lib,libname,_s.a) @@\
MakeDir($(DESTDIR)/usr/lib) @@\
$(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)/usr/lib @@\
install.runtime:: Concat4(lib,libname,rev,_s) @@\
MakeDir($(DESTDIR)/shlib) @@\
$(INSTALL) -c $(INSTBINFLAGS) Concat4(lib,libname,rev,_s) $(DESTDIR)/shlib
#endif /* InstallStaticSharedLibrary */
/*
* InstallSharedLibraryData - generate rules to install the shared library data
*/
#ifndef InstallSharedLibraryData
#define InstallSharedLibraryData(libname,rev,dest)
#endif /* InstallSharedLibraryData */
/*
* StaticSharedLibraryTarget - generate rules to create a shared library;
* the touch rule at the end of this mkshilb is to allow the Append
* rule below to know when a new libX11_s.a has been built ( we can't
* test against the target lib because it's built before the .a, and
* we can't test against itself because this is a predecessor circle.)
*/
#ifndef StaticSharedLibraryTarget
#define StaticSharedLibraryTarget(libname,rev,solist,down,up) @@\
AllTarget(Concat3(lib,libname,_s.a)) @@\
@@\
Concat3(lib,libname,_s.a):: specfile solist @@\
$(RM) Concat4(lib,libname,_s.a,_is_new) @@\
$(RM) Concat4(lib,libname,rev,_s~) Concat3(lib,libname,_s.a~) @@\
-$(MV) Concat4(lib,libname,rev,_s) Concat4(lib,libname,rev,_s~) @@\
-$(MV) Concat3(lib,libname,_s.a) Concat3(lib,libname,_s.a~) @@\
$(MKSHLIB) -q -s specfile -t Concat4(lib,libname,rev,_s) -h $@ @@\
[ -f Concat3(lib,libname,_s.a) ] && \ @@\
touch Concat4(lib,libname,_s.a,_is_new) @@\
@@\
clean:: @@\
$(RM) Concat4(lib,libname,rev,_s) Concat3(lib,libname,_s.a) \ @@\
Concat4(lib,libname,_s.a,_is_new)
#endif /* StaticSharedLibraryTarget */
/* S22
* SharedLibraryTarget - generate rules to create a DLL shared library;
* To get around the insufficient env space when building Xlib, there
* is an indirection in building the shared DLL library. When that
* problem is (ever) fix, I'll clean up the code (garyh@sco.com).
*
*/
#ifndef SharedLibraryTarget
#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
AllTarget(Concat4(lib,libname,.so.,rev)) @@\
@@\
Concat4(lib,libname,.so.,rev):: solist @@\
(cd down && $(MAKE) -f ../Makefile $@.indirect) @@\
$(MV) down/$@ $@ @@\
$(RM) Concat(lib,libname.so) @@\
$(LN) $@ Concat(lib,libname.so) @@\
@@\
Concat4(lib,libname,.so.,rev).indirect:: @@\
$(CC) SharedDLLObjOptions Bl8EnvInd $(PICFLAGS) -o Concat4(lib,libname,.so.,rev) solist @@\
@@\
clean:: @@\
$(RM) Concat4(lib,libname,.so.,rev) @@\
$(RM) Concat3(lib,libname,.so) @@\
#endif /* SharedLibraryTarget */
/*
* SharedLibraryTargetAppend - generate rules to append to a shared library;
*/
#ifndef SharedLibraryTargetAppend
#define SharedLibraryTargetAppend(libname,appendlist) @@\
AllTarget(Concat3(lib,libname,_s.a)) @@\
@@\
Concat3(lib,libname,_s.a):: appendlist Concat4(lib,libname,_s.a,_is_new)@@\
[ -f $@ ] && $(AR) $@ appendlist @@\
RanLibrary($@)
#endif /* SharedLibraryTargetAppend */
/*
* SharedLibraryDataTarget - generate rules to create shlib data file;
*/
#ifndef SharedLibraryDataTarget
#define SharedLibraryDataTarget(libname,rev,salist)
#endif /* SharedLibraryTarget */
/*
* NamedLibraryTarget - generate rules to create a library withou prepending
* lib to the library name and remove comments via mcs(CP)
*/
#ifndef NamedLibraryTarget
#define NamedLibraryTarget(libname,objlist) @@\
AllTarget(libname.a) @@\
@@\
libname.a: objlist @@\
$(RM) $@ @@\
$(MCS) objlist @@\
$(AR) $@ objlist @@\
RanLibrary($@)
#endif /* NamedLibraryTarget */
/*
* NormalLibraryTarget - generate rules to create a library.
* and remove comments via mcs(CP)
*/
#ifndef NormalLibraryTarget
#define NormalLibraryTarget(libname,objlist) @@\
AllTarget(Concat(lib,libname.a)) @@\
@@\
Concat(lib,libname.a): objlist @@\
$(RM) $@ @@\
$(MCS) objlist @@\
$(AR) $@ objlist @@\
RanLibrary($@)
#endif /* NormalLibraryTarget */
/*
* NormalLibraryTarget2 - generate rules to create a library in two steps.
* This is used to create libraries with large numbers of files.
* and remove comments via mcs(CP)
*/
#ifndef NormalLibraryTarget2
#define NormalLibraryTarget2(libname,objlist1,objlist2) @@\
AllTarget(Concat(lib,libname.a)) @@\
@@\
Concat(lib,libname.a):: objlist1 @@\
$(RM) $@ @@\
$(MCS) objlist1 @@\
$(AR) $@ objlist1 @@\
Concat(lib,libname.a):: objlist2 @@\
$(MCS) objlist2 @@\
$(AR) $@ objlist2 @@\
RanLibrary($@)
#endif /* NormalLibraryTarget2 */
/*
* NormalLibraryTarget3 - generate rules to create a library in three steps.
* This is used to create libraries with very large numbers of files.
* for SCO we also and remove COFF comments via mcs(CP)
*/
#ifndef NormalLibraryTarget3
#define NormalLibraryTarget3(libname,objlist1,objlist2,objlist3) @@\
AllTarget(Concat(lib,libname.a)) @@\
@@\
Concat(lib,libname.a):: objlist1 @@\
$(RM) $@ @@\
$(MCS) objlist1 @@\
$(AR) $@ objlist1 @@\
Concat(lib,libname.a):: objlist2 @@\
$(MCS) objlist2 @@\
$(AR) $@ objlist2 @@\
Concat(lib,libname.a):: objlist3 @@\
$(MCS) objlist3 @@\
$(AR) $@ objlist3 @@\
RanLibrary($@)
#endif /* NormalLibraryTarget3 */
/*
* LibCleanDir - helper for cleaning library object subdirectories
* This failed when the arg list was too long for /bin/sh,
* not we just use echo *.o|xargs
* hess@sco.com
*/
#ifndef LibCleanDir
#define LibCleanDir(dir) -@if [ -d dir ]; then \ @@\
(set -x; cd dir; echo *.o |xargs $(RM)); else exit 0; fi
#endif
/* ExtractObject - get an object out of one archive and leave it in
* the current directory.
* NOTE: we cannot use $(AR), as this is for building archives
*/
#ifndef ExtractObject
#define ExtractObject(obj,archive) @@\
obj: archive @@\
ar xv $? $@
#endif
/* to build objects in a shared lib dir, that will never be shared */
#ifndef NotSharedObjects
#define NotSharedObjects(objs) @@\
objs: @@\
_DebuggedObjCompile($(_NOOP_)) @@\
_ProfiledObjCompile($(_NOOP_)) @@\
_NormalObjCompile($(_NOOP_)) @@\
#endif
#ifndef InstallAppStartup
#define InstallAppStartup(class) @@\
install:: class.as @@\
MakeDir($(DESTDIR)$(STARTUPDIR)) @@\
$(INSTALL) -c $(INSTALLAPPFLAGS) class.as $(DESTDIR)$(STARTUPDIR)/class @@\
#endif
#ifndef InstallAppDefaultsSubDir
#define InstallAppDefaultsSubDir(src,dst,dir) @@\
install:: src @@\
MakeDir($(DESTDIR)$(XAPPLOADDIR)/dir) @@\
$(INSTALL) -c $(INSTAPPFLAGS) src $(DESTDIR)$(XAPPLOADDIR)/dir/dst @@\
#endif